<?php


class TimetableLinkGen extends LinkGen {

	public function link($id, $additionalParams = array()){
		$query = Doctrine_Query::create()
							  ->select('id')
							  ->from('Structure')
							  ->where('parameter = ? AND lang = ?', array('timetable', $additionalParams['lang']));
		$node = $query->fetchOne();
		if ($node) {
			$nodeId = $node->getId();
		} else {
			$nodeId = '';
		}



		$link = LinkGen::getInstance(LinkGen::STRUCTURE)->link($nodeId);
		return $link;
	}

	protected function init(){

	}

	public function linkParts($id, $additionalParams = array()){

	}
}